// 表单通用样式
.create-form {

	:deep(.el-form) {
		.form-input {
			width: 100%;

			// 图片上传组件样式优化
			&.wtm-upload-image {
				.el-upload {
					width: 100%;
					border: 1px dashed var(--el-border-color);
					border-radius: 4px;
					transition: all 0.3s;
					cursor: pointer;
					position: relative;
					text-align: center;
					overflow: hidden;

					&:hover {
						border-color: var(--el-color-primary);
						background-color: var(--el-color-primary-light-9);
					}

					.el-icon {
						font-size: 28px;
						color: #8c939d;
						margin: 16px 0 8px;
					}

					.el-upload__text {
						color: var(--el-text-color-regular);
						font-size: 14px;
						margin-bottom: 16px;
					}
				}

				.el-upload-list {
					.el-upload-list__item {
						margin: 0;
						padding: 8px;
						border: 1px solid var(--el-border-color-light);
						border-radius: 4px;
						margin-top: 8px;

						&:hover {
							background-color: var(--el-color-primary-light-9);
						}

						.el-upload-list__item-thumbnail {
							object-fit: cover;
							width: 100%;
							height: 120px;
							border-radius: 2px;
						}
					}
				}
			}

			// 文件上传组件样式优化
			&.wtm-upload-file {
				.el-upload {
					width: 100%;

					.el-button {
						width: 100%;
						border: 1px dashed var(--el-border-color);
						background: transparent;

						&:hover {
							border-color: var(--el-color-primary);
							color: var(--el-color-primary);
							background-color: var(--el-color-primary-light-9);
						}
					}
				}

				.el-upload-list {
					margin-top: 8px;

					.el-upload-list__item {
						padding: 4px 8px;
						border: 1px solid var(--el-border-color-light);
						border-radius: 4px;
						margin: 4px 0;

						&:hover {
							background-color: var(--el-color-primary-light-9);
						}
					}
				}
			}

			.el-input__wrapper,
			.el-select__wrapper,
			.el-date-editor.el-input__wrapper,
			.el-input-number__wrapper {
				width: 100%;
			}
		}

		.el-form-item {
			margin-bottom: 18px;

			.el-form-item__label {
				font-size: 14px;
				color: var(--el-text-color-regular);
			}

			.el-form-item__content {
				.form-input {
					width: 100%;

					&.el-input,
					&.el-select,
					&.el-date-picker,
					&.el-input-number,
					&.wtm-upload-image,
					&.wtm-upload-file,
					&.el-date-editor {
						width: 100%;

						.el-input__wrapper {
							width: 100%;
						}
					}
				}
			}
		}
	}

	.form-section {
		margin-bottom: 24px;

		.section-title {
			display: flex;
			align-items: center;
			font-size: 16px;
			font-weight: 600;
			margin-bottom: 16px;
			padding: 8px 0;
			border-bottom: 2px solid var(--el-border-color-light);

			i {
				margin-right: 8px;
				font-size: 18px;
				color: var(--el-color-primary);
			}

			span {
				color: var(--el-text-color-primary);
			}
		}
	}

	.form-footer {
		margin-top: 24px;
		text-align: right;
		border-top: 1px solid var(--el-border-color-light);
		padding-top: 16px;
	}

	:deep(.el-form-item) {
		margin-bottom: 22px;

		.el-form-item__label {
			font-weight: 500;
			color: var(--el-text-color-primary);
			padding-right: 12px;
			line-height: 32px;

			&.is-required {
				&::before {
					content: '*';
					color: var(--el-color-danger);
					margin-right: 4px;
					font-size: 14px;
					position: relative;
					top: 4px;
				}
			}
		}

		.el-form-item__content {
			line-height: 32px;
			width: 100%;
		}
	}

	:deep(.el-input),
	:deep(.el-select),
	:deep(.el-date-picker),
	:deep(.el-input-number),
	:deep(.wtm-upload-image),
	:deep(.wtm-upload-file) {
		width: 100% !important;

		.el-input__wrapper {
			width: 100%;
			box-shadow: 0 0 0 1px var(--el-border-color) inset;
			padding: 1px 11px;
			transition: all 0.2s;
			border-radius: 4px;

			&:hover {
				box-shadow: 0 0 0 1px var(--el-border-color-hover) inset;
			}

			&.is-focus {
				box-shadow: 0 0 0 1px var(--el-color-primary) inset;
			}
		}

		&.el-input-number .el-input__wrapper {
			padding-left: 0;
			padding-right: 0;
		}
	}
}

// 表单区块样式
.form-section {
	position: relative;
	margin-bottom: 30px;
	padding-bottom: 10px;

	@media screen and (max-width: 768px) {
		margin-bottom: 20px;
		padding-bottom: 5px;
	}

	&::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 1px;
		background: linear-gradient(to right, var(--el-border-color) 0%, transparent 100%);
	}

	.section-title {
		font-size: 16px;
		font-weight: 600;
		color: var(--el-text-color-primary);
		margin-bottom: 20px;
		display: flex;
		align-items: center;

		@media screen and (max-width: 768px) {
			font-size: 14px;
			margin-bottom: 15px;
		}

		&::before {
			content: '';
			width: 4px;
			height: 16px;
			background-color: var(--el-color-primary);
			margin-right: 8px;
			border-radius: 2px;
		}
	}
}

// 表单底部样式
.form-footer {
	text-align: right;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--el-border-color-light);
}

// 通用工具类
.mb20 {
	margin-bottom: 20px;
}

//统一所有宽度
.width100 {
	width: 100% !important;
}

// 响应式样式
@media screen and (max-width: 768px) {
	.create-form {
		padding: 10px;

		:deep(.el-form) {
			.el-form-item__label {
				font-size: 13px;
			}
		}

		.form-section {
			margin-bottom: 16px;

			.section-title {
				font-size: 15px;
				margin-bottom: 12px;
				padding: 6px 0;

				i {
					font-size: 16px;
				}
			}
		}

		.el-col {
			padding-left: 10px !important;
			padding-right: 10px !important;
		}
	}
}